﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RealWorldObjects
{
    class Chair
    {
        public string chairlName;
        public List<Group> groups = new List<Group>();
        public static int chairCount = 100;

        public static Chair GenerateRandomChair()
        {
            Chair chair = new Chair();
            chairCount++;
            chair.chairlName = "Chair " + chairCount;
            for (int i =0; i < 3; i++)
            {
                Group grp = Group.generateRandomGroup();
                chair.groups.Add(grp);
            }
            return chair;
        }
        public void PrintChairToConsole()
        {
            Console.WriteLine("Chair name: {0}", chairlName);
            foreach (var group in groups)
            {
                group.PrintGroupToConsoleLowerThan50();
            }
            Console.WriteLine("=============================");
        }
    }
}
